{include file="public/header" /}
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>转移用户</h5>
                </div>
                <div class="ibox-content layui-form">
                    <div class="layui-row layui-col-space10 layui-form-item ">

                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">选择学校：</label>
                            <div class="layui-input-block">
                                <select name="school_id"  xm-select="select1" lay-verify="required" xm-select-search="" xm-select-radio="" xm-select-search-type="dl">
                                    <option value="" >请选择</option>
                                    {foreach name="school" item="v"}
                                    <option value="{$v.school_id}" >{$v.school_name}</option>
                                    {/foreach}
                                </select>
                            </div>
                        </div>

                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">选择年级：</label>
                            <div class="layui-input-block">
                                <select name="grade_id" disabled>
                                    <option value="" >请选择</option>
                                    {foreach name="grade" item="vv"}
                                    <option value="{$vv.grade_id}" {$vv.grade_id==$grade_id?'selected':''}>{$vv.grade_name}</option>
                                    {/foreach}
                                </select>
                            </div>
                        </div>

                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8 form-group">
                            <label class="layui-form-label">选择班级：</label>
                            <div class="layui-input-block">
                                <select name="class_id">
                                    {foreach name="class" item="vo"}
                                    <option value="{$vo.class_id}" >{$vo.class_name}</option>
                                    {/foreach}
                                </select>
                            </div>
                        </div>
                        <input type="hidden" value="{$ids}" name="ids">
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit="" lay-filter="component-form-element">确定
                                </button>
                                <button class="layui-btn layui-btn-primary" onclick="history.go(-1)">关闭</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{include file="public/footer" /}
<script>
    layui.use(['form','upload','layedit'], function() {
        var form = layui.form;
        form.on('submit(component-form-element)', function (data) {
            $('.layui-btn').addClass('layui-disabled').attr('disabled','disabled');
            $.ajax({
                url:"{:url('doShiftAll')}",
                type:'post',
                dataType:'json',
                data:data.field,
                success:function(res){
                    if (res.code == 200) {
                        wk.success(res.msg,"{:url('School/schoolStudent')}")
                    } else {
                        wk.error(res.msg,'','$(".layui-btn").removeClass(\'layui-disabled\').removeAttr(\'disabled\');');
                    }
                }
            })
        });
    });
</script>
</body>
</html>
